package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "FIM")
public class Fim implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "FIM", nullable = false)
	private String fim;
	@Version
	@Column(name = "VERSION")
	private int fimversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "FIM_NUMBER", nullable = false, length = 10)
	private long fimNumber;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "FORWARD_CARRIER", nullable = false, length = 2)
	private String forwardCarrier;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "FORWARD_FLIGHT", nullable = false, length = 5)
	private String forwardFlight;

	/**
	 *
	 */
	@Basic(optional = false)
	@Temporal(TemporalType.DATE)
	@Column(name = "FORWARD_DATE", nullable = false)
	private java.util.Date forwardDate;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "FORWARD_PLACE_INTERRUPT", nullable = false, length = 3)
	private String forwardPlaceInterrupt;

	/**
	 *
	 */
	@Column(name = "DIVERSION_BY", length = 3)
	private String diversionBy;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "PAX_QUANTITY", nullable = false, length = 4)
	private int paxQuantity;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "ISSUE_DATE")
	private java.util.Date issueDate;

	/**
	 *
	 */
	@Column(name = "SALE_RESPONSIBLE_FK")
	private String saleResponsibleFk;

	/**
	 *
	 */
	@Column(name = "OBSERVATION", length = 255)
	private String observation;

	/**
	 *
	 */
	@Column(name = "RESO", length = 10)
	private String reso;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "AIRLINE_FK", nullable = false, length = 3)
	private String airlineFk;

	/**
	 *
	 */
	@OneToMany(targetEntity = FimPax.class, mappedBy = "fim", fetch = FetchType.LAZY)
	private java.util.Set<FimPax> fimPax = new java.util.HashSet<FimPax>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponFlown.class, mappedBy = "fim", fetch = FetchType.LAZY)
	private java.util.Set<CouponFlown> couponFlown = new java.util.HashSet<CouponFlown>();

	/**
	 *
	 */
	@OneToMany(targetEntity = FimCoupon.class, mappedBy = "fim", fetch = FetchType.LAZY)
	private java.util.Set<FimCoupon> fimCoupon = new java.util.HashSet<FimCoupon>();

	/**
	 *
	 */
	@OneToMany(targetEntity = FimStHs.class, mappedBy = "fim", fetch = FetchType.LAZY)
	private java.util.Set<FimStHs> fimStHs = new java.util.HashSet<FimStHs>();

	/**
	 *
	 */
	@ManyToOne(targetEntity = ReasonOfIssuanceFim.class, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "REASON_OF_ISSUANCE_FK", referencedColumnName = "CODE") })
	private ReasonOfIssuanceFim reasonOfIssuance;

	/**
	 *
	 */
	@OneToOne(targetEntity = FimSt.class, mappedBy = "fim", fetch = FetchType.LAZY)
	private FimSt fimSt;

	public Fim() {
	}

	// Constructor for primary key
	public Fim(String fim) {
		this.fim = fim;
	}

	/**
	 *
	 */
	public String getFim() {
		return fim;
	}

	public int getFimversion() {
		return fimversion;
	}

	public void setFimversion(int fimversion) {
		this.fimversion = fimversion;
	}

	public long getFimNumber() {
		return fimNumber;
	}

	public void setFimNumber(long fimNumber) {
		this.fimNumber = fimNumber;
	}

	public String getForwardCarrier() {
		return forwardCarrier;
	}

	public void setForwardCarrier(String forwardCarrier) {
		this.forwardCarrier = forwardCarrier;
	}

	public String getForwardFlight() {
		return forwardFlight;
	}

	public void setForwardFlight(String forwardFlight) {
		this.forwardFlight = forwardFlight;
	}

	public java.util.Date getForwardDate() {
		return forwardDate;
	}

	public void setForwardDate(java.util.Date forwardDate) {
		this.forwardDate = forwardDate;
	}

	public String getForwardPlaceInterrupt() {
		return forwardPlaceInterrupt;
	}

	public void setForwardPlaceInterrupt(String forwardPlaceInterrupt) {
		this.forwardPlaceInterrupt = forwardPlaceInterrupt;
	}

	public String getDiversionBy() {
		return diversionBy;
	}

	public void setDiversionBy(String diversionBy) {
		this.diversionBy = diversionBy;
	}

	public int getPaxQuantity() {
		return paxQuantity;
	}

	public void setPaxQuantity(int paxQuantity) {
		this.paxQuantity = paxQuantity;
	}

	public java.util.Date getIssueDate() {
		return issueDate;
	}

	public void setIssueDate(java.util.Date issueDate) {
		this.issueDate = issueDate;
	}

	public String getSaleResponsibleFk() {
		return saleResponsibleFk;
	}

	public void setSaleResponsibleFk(String saleResponsibleFk) {
		this.saleResponsibleFk = saleResponsibleFk;
	}

	public String getObservation() {
		return observation;
	}

	public void setObservation(String observation) {
		this.observation = observation;
	}

	public String getReso() {
		return reso;
	}

	public void setReso(String reso) {
		this.reso = reso;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public String getAirlineFk() {
		return airlineFk;
	}

	public void setAirlineFk(String airlineFk) {
		this.airlineFk = airlineFk;
	}

	public java.util.Set<FimPax> getFimPax() {
		return fimPax;
	}

	public void setFimPax(java.util.Set<FimPax> fimPax) {
		this.fimPax = fimPax;
	}

	public void addFimPax(FimPax fimPax) {
		this.fimPax.add(fimPax);
	}

	public void removeFimPax(FimPax fimPax) {
		this.fimPax.remove(fimPax);
	}

	public java.util.Set<CouponFlown> getCouponFlown() {
		return couponFlown;
	}

	public void setCouponFlown(java.util.Set<CouponFlown> couponFlown) {
		this.couponFlown = couponFlown;
	}

	public void addCouponFlown(CouponFlown couponFlown) {
		this.couponFlown.add(couponFlown);
	}

	public void removeCouponFlown(CouponFlown couponFlown) {
		this.couponFlown.remove(couponFlown);
	}

	public java.util.Set<FimCoupon> getFimCoupon() {
		return fimCoupon;
	}

	public void setFimCoupon(java.util.Set<FimCoupon> fimCoupon) {
		this.fimCoupon = fimCoupon;
	}

	public void addFimCoupon(FimCoupon fimCoupon) {
		this.fimCoupon.add(fimCoupon);
	}

	public void removeFimCoupon(FimCoupon fimCoupon) {
		this.fimCoupon.remove(fimCoupon);
	}

	public java.util.Set<FimStHs> getFimStHs() {
		return fimStHs;
	}

	public void setFimStHs(java.util.Set<FimStHs> fimStHs) {
		this.fimStHs = fimStHs;
	}

	public void addFimStHs(FimStHs fimStHs) {
		this.fimStHs.add(fimStHs);
	}

	public void removeFimStHs(FimStHs fimStHs) {
		this.fimStHs.remove(fimStHs);
	}

	public ReasonOfIssuanceFim getReasonOfIssuance() {
		return reasonOfIssuance;
	}

	public void setReasonOfIssuance(ReasonOfIssuanceFim reasonOfIssuance) {
		this.reasonOfIssuance = reasonOfIssuance;
	}

	public FimSt getFimSt() {
		return fimSt;
	}

	public void setFimSt(FimSt fimSt) {
		this.fimSt = fimSt;
	}
}
